<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>

<body>
    <div id ="app">
        <my-button></my-button>
    </div>

    <div id ="app2">
        <my-button></my-button>
    </div>
   
    <template id="btn">
        <button @click="count += 1">{{count}}</button>
    </template>
    <script>
    const button = {
        template: '#btn',
        data() {
            return {
                count:0
            }
        }
    }
    var app = new Vue({
        el: '#app',
        components: { 
            'myButton': button
        }
    })

    var app2 = new Vue({
        el: '#app2',
        components: { 
            'myButton': button
        }
    })
    </script>
</body>

</html>